﻿package com.wandian.view.components.ui
{
	import com.wandian.ApplicationFacade;
	import com.wandian.controller.CLZNoticeName;
	import com.wandian.data.GameData;
	import com.wandian.model.AccountProxy;
	import com.wandian.model.UserInfoProxy;
	import com.wandian.model.vo.FaceVo;
	import com.wandian.model.vo.FriendVo;
	import com.wandian.model.vo.PropVo;
	import com.wandian.model.vo.RoomVo;
	import com.wandian.util.CLZLlistScrollPanel;
	import com.wandian.util.CLZLoadIcon;
	import com.wandian.util.CLZTabBar;
	import com.wandian.util.CLZZoom;
	import com.wandian.util.GlowFilterManage;
	import com.wandian.util.ToolTip;

	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.MouseEvent;
	import flash.events.TextEvent;
	/**   
	* @author long
	* @QQ 108232706
	* @version 1.0   
	*/   
	public class FriendPanel extends Object
	{
		private var _facade:ApplicationFacade;
		private var _global:GameData;
		private var _userInfo:UserInfoProxy;
		private var _contenMc:Sprite;

		public function FriendPanel(param1:Sprite)
		{
			this._facade=ApplicationFacade.getInstance();
			this._global=GameData.getInstance();
			this._userInfo=this._facade.retrieveProxy(UserInfoProxy.NAME) as UserInfoProxy;
			this._contenMc=new Sprite();
			param1.addChild(this._contenMc);
			param1["title_txt"].text=GameData.tip["YOU_FRIEND_LIST_TITLE"];
			this._contenMc.x=9;
			this._contenMc.y=38;
			this.showList(this._userInfo.arrFriend);
			return;
		} 

		private function showList(param1:Array, param2:String="SHOW_FRIEND_LIST_RES"):void
		{
			var _loc_6:MovieClip=null;
			var _loc_7:FriendVo=null;
			var _loc_8:PlayerInfoMc=null;
			GameData.removeNumChildre(this._contenMc);
			if (param1 == null)
			{
				return;
			}
			var _loc_3:*=new CLZLlistScrollPanel(1, 160, 60, 0, 0, 332, 165);
			this._contenMc.addChild(_loc_3);
			var _loc_4:*=param1.length;
			var _loc_5:int=0;
			while (_loc_5 < _loc_4)
			{

				_loc_6=GameData.getMovieClip("FriendInfoMc");
				_loc_3.setMc(_loc_6, _loc_5, _loc_4);
				_loc_7=param1[_loc_5] as FriendVo;
				if (_loc_7 == null)
				{
				}
				else
				{
					_loc_8=new PlayerInfoMc(_loc_6, _loc_7, param2);
				}
				_loc_5=_loc_5 + 1;
			}
			return;
		} 

	}
}
